package torres.view;

import javax.swing.JComponent;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;

import torres.map.*;

/**
 * @author Torres
 * Abstract class that provides skeleton for the two areaViewPort
 * these being AsciiAreaViewPort and TwoDAreaViewPort 
 */
@SuppressWarnings("serial")
public abstract class AreaViewPort extends JPanel {
	final static int AREA_WIDTH = 505;
	final static int AREA_HEIGHT = 515;
	final static World world = World.getInstance();
	
	/**
	 * Renders the view port using data from the Map.
	 */
	public abstract void draw();
	
	
	/**
	 * Sets the current map to be the specified map.
	 * @param map The new map from which to draw information.
	 */
	public abstract void setCurrentMap(Map map);
	
	
	/**
	 * Returns the current layer pane.
	 * @return The current layer pane if it exists, null otherwise.
	 */
	public JLayeredPane getLayerPane() {
		return null;
	}
	
	/**
	 * Returns the JComponent representing the area
	 * @return The JComponent representing the area
	 */
	public abstract JComponent getArea();
	
	
	/**
	 * Tests to see if the view port is an ASCII view port
	 * @return True if this is an ASCII viewport, false otherwise.
	 */
	public abstract boolean isAscii();
	
	/**
	 * Tests to see if the view port is an TwoD view port
	 * @return True if this is an TwoD viewport, false otherwise.
	 */
	public abstract boolean isTwoD();
}